# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1313253271.313341
_template_filename='/home/bastian/workspaces/c-chrysalide/trunk/portal/portal/templates/home/home.mako'
_template_uri='/home/home.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['title']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/index.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        news = context.get('news', UNDEFINED)
        c = context.get('c', UNDEFINED)
        tr = context.get('tr', UNDEFINED)
        all_news = context.get('all_news', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        runtime._include_file(context, u'/home/right.mako', _template_uri)
        __M_writer(u'\n')
        # SOURCE LINE 3
        __M_writer(u'\n')
        # SOURCE LINE 4

        def show_news(news_db):
                all_news = ''
                
                for news in news_db:
                        tr = '<tr>'
                        tr = tr + '<td class="middle_news">'
                        tr = tr + '<div class="news_div">'
                        tr = tr + '<h2>%s</h2>' % news.title
                        tr = tr + '%s' % news.content
                        tr = tr + '</div>'
                        tr = tr + '</td>'
                        tr = tr + '</tr>'
                        all_news = all_news + tr
        
                return all_news
        
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['show_news'] if __M_key in __M_locals_builtin_stored]))
        # SOURCE LINE 20
        __M_writer(u'\n\n\n\n<div id="news_content">\n\t<table cellspacing="0" cellpadding="0" border="0" id="news_article">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=\'top_news\'></td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t ')
        # SOURCE LINE 31
        __M_writer(show_news(c.news) )
        __M_writer(u"\n\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class='bottom_news'></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>")
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_title(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 3
        __M_writer(u'Compagnie-Chrysalide - Accueil')
        return ''
    finally:
        context.caller_stack._pop_frame()


